n=500; m=50; k=1; tube=[|364,31,42|]; X=[47,6,43,20,17,45,37,3,14,14,46,30,21,14,28,15,19,17,23,29,25,25,22,19,5,39,42,3,33,40,34,45,29,24,47,7,32,44,14,44,1,23,7,21,46,10,26,42,17,23,24,46,11,9,9,3,40,17,12,46,5,43,12,45,12,8,47,45,49,47,12,27,31,9,36,5,17,26,48,21,44,49,38,9,3,6,12,31,35,39,5,17,7,9,24,19,14,14,17,43,33,48,40,41,28,8,39,9,22,49,8,18,40,22,8,40,29,45,17,5,27,33,41,16,19,18,37,46,21,43,48,29,27,1,17,44,22,20,28,30,1,28,37,25,8,46,7,32,5,33,48,25,19,38,29,4,26,27,17,26,24,35,2,25,10,32,49,33,1,19,43,14,10,37,46,10,39,17,17,2,14,39,40,35,47,26,36,15,40,31,19,22,40,3,39,38,38,20,4,29,19,45,10,11,16,1,42,46,16,44,9,13,19,34,42,22,33,21,32,2,27,37,25,8,38,6,39,3,7,35,10,20,29,40,26,15,44,27,40,24,36,29,4,42,23,18,44,30,32,39,18,16,16,40,32,34,48,8,49,21,32,9,36,4,15,36,12,4,49,33,17,9,39,22,20,20,42,32,28,2,44,34,44,33,40,34,42,27,8,35,3,34,43,22,18,28,12,17,9,5,25,16,31,9,2,26,3,47,37,32,48,21,32,20,47,49,18,49,13,2,11,18,48,19,39,44,17,2,7,44,1,36,14,31,3,1,16,30,37,4,6,24,17,25,3,32,24,31,8,29,5,27,46,38,6,20,48,42,25,43,47,34,3,18,37,29,25,17,12,15,7,38,38,30,4,44,8,21,48,29,40,32,13,46,13,2,5,34,21,11,41,29,39,18,47,28,9,8,23,49,19,15,41,26,22,45,47,26,33,23,44,23,25,23,43,43,28,44,16,40,13,10,19,45,33,32,34,34,44,17,33,4,22,35,23,34,21,49,38,46,23,3,42,25,47,28,1,2,44,14,23,13,1,43,17,14,23,6,7,12,27,44,36,5,37,3,26,14,31,20,2,46,5,1,37,25,17,45,19,38,33,26,10,44,7,48,8,42,46,37,20,2,35,44,7,21,23,3,46,34]; Y=[1,36,4,13,34,31,43,3,22,48,5,47,14,23,18,25,20,12,36,44,24,12,32,40,38,1,19,18,16,16,10,8,12,8,3,27,32,4,13,18,33,48,26,44,17,35,6,11,16,20,29,6,40,30,8,14,31,3,38,8,7,30,40,33,18,35,10,13,4,13,1,7,48,42,11,40,3,33,21,10,29,46,44,42,7,19,37,47,44,22,48,26,47,5,30,18,18,2,22,24,4,44,29,31,35,33,24,45,23,45,18,21,31,12,20,46,38,24,37,45,12,16,46,18,15,26,35,32,23,33,34,27,25,44,6,48,32,13,35,3,47,42,30,8,23,6,25,34,38,21,32,20,44,46,23,34,32,13,2,24,22,36,17,7,13,8,7,18,21,30,28,19,45,31,13,26,44,40,46,26,34,13,22,46,9,40,44,1,2,41,46,8,43,7,5,3,27,33,5,1,10,5,10,5,41,34,23,33,49,11,37,2,33,22,19,11,18,42,31,48,3,20,34,45,2,46,19,8,36,4,12,43,40,17,42,3,2,24,34,28,30,30,31,15,32,32,42,23,21,13,9,17,42,6,14,23,18,2,49,27,44,26,44,19,48,37,2,27,48,36,22,16,16,43,43,2,34,28,41,47,38,6,42,43,21,7,42,36,5,28,5,44,22,26,24,12,17,6,5,4,38,22,42,43,43,4,16,2,20,5,11,10,37,46,29,27,15,4,13,14,28,13,20,35,2,37,15,48,22,4,49,23,35,31,33,13,18,14,49,32,3,22,26,23,25,8,18,42,17,10,29,20,7,38,46,16,44,15,18,27,30,21,20,15,46,41,6,26,10,23,39,10,31,13,23,1,29,15,43,40,8,15,4,24,11,24,40,43,14,29,6,4,5,37,46,37,15,21,9,40,2,28,4,17,37,18,29,36,43,30,6,3,35,47,22,17,8,19,21,42,40,10,35,2,23,27,10,14,7,37,10,12,3,37,31,40,48,40,49,21,33,12,36,41,41,35,36,22,42,22,3,48,12,38,40,44,16,21,30,9,45,32,45,30,23,15,15,31,7,3,38,30,2,16,17,14,19,4,5,12,40,14,44,46,19,13,45,17,47,38,12,36,47,5,33,39,2,38,3,8];